* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
div {
    /* 一行效果：宽度占一半、浮动 */
    float: left;
    width: 50%;
    height: 100px;
}

div:nth-child(odd) {
    background-color: skyblue;
}

div:nth-child(even) {
    background-color: orangered;
}